//
//  ActionHandler.h
//  MVP_DesignModel_OCVersion
//
//  Created by DeLong Yang on 2017/7/20.
//  Copyright © 2017年 DeLongYang. All rights reserved.
/*
    这一块相对来说比较独立 这里主要拦截一个action 执行的生命周期
 */

#import <Foundation/Foundation.h>

@class TemplateAction;
@protocol ActionHandlerDelegate;

@interface ActionHandler : NSObject

@property (nonatomic,strong,readonly)TemplateAction *action;

@property (nonatomic,weak)id<ActionHandlerDelegate>delegate;

- (BOOL)handleAction:(TemplateAction *)action;

@end


@protocol ActionHandlerDelegate <NSObject>

- (void)actionHandler:(ActionHandler *)handler willHandleAction:(TemplateAction *)action;

- (void)actionHandler:(ActionHandler *)handler didHanlderAction:(TemplateAction *)action;

@end
